import AjaxForBusOpen from '@/utils/AjaxForBusOpen'

/**
 * 获取车辆详情
 * @param {*} busID
 */
async function getBusDetail(busID) {
  let postData = {
    ID: busID
  }
  let res
  res = await AjaxForBusOpen(
    '/chartered-bus-api/chartered/vehicle/detail',
    postData
  )
  let busDetailObj = {
    busName: res.BUS_NAME,
    picList: res.PIC_URL_LIST,
    availableSeat: res.AVAILABLE_SEAT
  }
  return busDetailObj
}

export { getBusDetail }
